package com.jsmy.softapp.onListener;

import android.app.Activity;

import com.umeng.socialize.ShareAction;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.shareboard.SnsPlatform;
import com.umeng.socialize.utils.ShareBoardlistener;

/**
 * Created by PC_WLT on 2018/4/27.
 */

public class OnShareBoardListener implements ShareBoardlistener {

    private String TAG=this.getClass().getSimpleName();
    Activity mContext;
    ShareAction mShareAction;
    private UMShareListener mOnUMShareActionListener;

    public OnShareBoardListener(Activity context,ShareAction showShareAction,UMShareListener onUMShareActionListener) {
        this.mContext=context;
        this.mShareAction=showShareAction;
        this.mOnUMShareActionListener=onUMShareActionListener;
    }

    @Override
    public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
        mShareAction .setPlatform(share_media)
                .setCallback(mOnUMShareActionListener)
                .share();
    }

}
